<jsp:directive.page contentType="text/html;charset=UTF-8" />
<%@ taglib uri="http://struts.apache.org/tags-bean" prefix="bean"%>
<%@ taglib uri="http://struts.apache.org/tags-html" prefix="html"%>
<%@ taglib uri="../../WEB-INF/c.tld" prefix="c" %>

<div class="menuStat">
	<ul class="nav nav-pills">
		<li class="${stat.stock }"><a href="<%= request.getContextPath() %>/stat-stock.do"><bean:message key="menuStat.statStock" /></a></li>
		<li class="${stat.article }"><a href="<%= request.getContextPath() %>/stat-article-commande.do"><bean:message key="menuStat.articleCommande" /></a></li>
		<li class="${stat.enregistre }"><a href="<%= request.getContextPath() %>/stat-commande-enregistre.do"><bean:message key="menuStat.commandeEnregistre" /></a></li>
		<li class="${stat.envoye }"><a href="<%= request.getContextPath() %>/stat-commande-envoye.do"><bean:message key="menuStat.commandeEnvoye" /></a></li>
	</ul>
</div>

<form class="well form-inline">
   	<bean:message key="article.RefArticle" /> :
    <input type="text" class="input-small" name="recherche" value="">
    <bean:message key="stat.echelle" />
    <select name="type">
	    <option value="1" ><bean:message key="stat.month" /></option>
	    <option value="2" ><bean:message key="stat.year" /></option>
	 </select>
    <button type="submit" class="btn btn-success"><bean:message key="general.rechercher" /></button>
</form>

<div id="chart">
</div>

<script type="text/javascript" src="styles/js/jquery.min.js"></script>
<script type="text/javascript" src="styles/js/jquery.jqplot.min.js"></script>
<script type="text/javascript" src="styles/js/plugins/jqplot.dateAxisRenderer.min.js"></script>
<link rel="stylesheet" type="text/css" href="styles/js/jquery.jqplot.min.css" />

<script type="text/javascript">
jQuery.noConflict();
jQuery(document).ready(function(){
    
	 var s1 = <%= request.getAttribute("stats") %>;
	 
    plot3 = jQuery.jqplot("chart", [s1], {
           seriesDefaults: {rendererOptions: {
               smooth: true
           }},
           axes:{xaxis:{renderer:jQuery.jqplot.DateAxisRenderer}},
           legend:{show:true}
    });
});
</script>